import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import "./style/index.scss"


import installElementPlus from './plugins/element'
import skyElement from '@/sky-element/'

const app = createApp(App)


//代码高亮文件引入
import hljs from 'highlight.js'
//样式文件,这里我选的是sublime样式，文件里面还有其他样式可供选择
import 'highlight.js/styles/monokai-sublime.css'

app.directive('highlight', function (el) {
  const blocks = el.querySelectorAll('pre code');
  blocks.forEach((block) => {
    hljs.highlightBlock(block)
  })
})


installElementPlus(app)
skyElement(app)



app.use(store).use(router).mount('#app')
